#pragma once

#ifndef __IASSISTGEN2_SRNLUTYPEDEF_H
#define __IASSISTGEN2_SRNLUTYPEDEF_H

#include <string>
#include "CommonUtil.h"

typedef enum {
	SR_ENGINE_VOCON33,
	SR_ENGINE_VOCON45,
	SR_ENGINE_GOOGLE,
	SR_ENGINE_NUANCE_CLOUD,
	SR_ENGINE_UNKNOWN
} SREngineType;

static const char* SREngineTypeStrings[] = {
	"VoCon",
	"Google",
	"NuanceCloud",
	"Unknown"
};

static const SREngineType getSREngineType(std::string str) {
	if (equalsIgnoreCase(str, "Vocon33"))	return SR_ENGINE_VOCON33;
	if (equalsIgnoreCase(str, "Vocon45"))	return SR_ENGINE_VOCON45;	
	if (equalsIgnoreCase(str, "Vocon"))		return SR_ENGINE_VOCON33;
	if (equalsIgnoreCase(str, "Google"))	return SR_ENGINE_GOOGLE;
	if (equalsIgnoreCase(str, "Nuance"))	return SR_ENGINE_NUANCE_CLOUD;
	return SR_ENGINE_UNKNOWN;
}

static const std::string getSREngineName(SREngineType type) {
	return SREngineTypeStrings[type];
}

typedef enum {
	NLU_ENGINE_VOCON,
	NLU_ENGINE_REGEX,
	NLU_ENGINE_UNKNOWN
} NLUEngineType;

static const char* NLUEngineTypeStrings[] = {
	"VoCon",
	"RegEx",
	"Unknwon"
};

static const NLUEngineType getNLUEngineType(std::string str) {
	if (equalsIgnoreCase(str, "Vocon33"))	return NLU_ENGINE_VOCON;
	if (equalsIgnoreCase(str, "Vocon45"))	return NLU_ENGINE_VOCON;
	if (equalsIgnoreCase(str, "Vocon"))		return NLU_ENGINE_VOCON;
	if (equalsIgnoreCase(str, "RegEx"))		return NLU_ENGINE_REGEX;
	return NLU_ENGINE_UNKNOWN;
}

static const std::string getNLUEngineName(NLUEngineType type) {
	return NLUEngineTypeStrings[type];
}

typedef enum {
	TTS_ENGINE_VAUTO,
	TTS_ENGINE_UNKNOWN
} TTSEngineType;

static const char* TTSEngineTypeStrings[] = {
	"VAuto",
	"Unknown"
};

static const TTSEngineType getTTSEngineType(std::string str) {
	if (equalsIgnoreCase(str, "VAuto"))	return TTS_ENGINE_VAUTO;
	return TTS_ENGINE_UNKNOWN;
}

static const std::string getTTSEngineName(TTSEngineType type) {
	return TTSEngineTypeStrings[type];
}
#endif